Computer graphics, in general, are visual scenes created using computers. Three-dimensional (3D) computer graphics provide users with views of 3D objects from particular viewpoints. Each object in a 3D scene (e.g., a teapot, house, person, etc.) may be defined in a 3D modeling space using primitive geometries. For example, a cylindrical object may be modeled using a cylindrical tube and top and bottom circular lids. The cylindrical tube and the circular lids may each be represented by a network or mesh of smaller polygons (e.g., triangles). Each polygon may, in turn, be stored based on the coordinates of their respective vertices in the 3D modeling space.
Even though 3D objects in computer graphics may be modeled in three dimensions, they are conventionally presented to viewers through rectangular two-dimensional (2D) displays, such as computer or television monitors. Due to limitations of the visual perception system of humans, humans expect to perceive the world from roughly the same vantage point at any instant. In other words, humans expect that certain portions of a 3D object would be visible and other portions would be hidden from view. Thus, for each 3D scene, a computer-graphics system may only need to render portions of the scene that are visible to the user and not the rest. This allows the system to drastically reduce the amount of computation needed.
Raycasting is a technique used for determining object visibility in a 3D scene. Conventionally, virtual rays are uniformly cast from a virtual pin-hole camera through every pixel of a virtual rectangular screen into the 3D world to determine what is visible (e.g., based on what portions of 3D objects the rays hit). However, this assumes that uniform ray distribution is reasonable when computing primary visibility from a virtual pinhole camera for conventional, rectangular display technologies with a limited field of view (e.g., computer monitors and phone displays). This assumption, however, does not hold for non-pinhole virtual cameras that more accurately represent real optical sensors. Moreover, current VR viewing optics (e.g., as integrated within a head-mounted display), provide a curved, non-uniform viewing surface rather than conventional rectangular displays. As a result, conventional rendering techniques, which are designed and optimized based on the aforementioned assumptions, are computationally inefficient, produce suboptimal renderings, and lack the flexibility to render scenes in artificial reality.